<script setup>
import SlideVerify from "vue3-slide-verify"; //引入滑动验证组件
import "vue3-slide-verify/dist/style.css"; //引入滑动验证组件样式
const emit = defineEmits()

const imgs = reactive([
    "https://public.hxdsmy.com/static/MTcyNTI3MzEzMDg0MDE2MTYzOQ==_cdn_script_1725273130000_MTcxNjI3ODgwNzkwNDAxMjI2Mg==_1716278814011.png",
    "https://public.hxdsmy.com/static/MTcyNTI3MzEzMDg0MDE2MTYzOQ==_cdn_script_1725273140000_MTcxNjI3ODgwNzkwNDAxMjI2Mg==_1716278829665.png",
    "https://public.hxdsmy.com/static/MTcyNTI3MzEzMDg0MDE2MTYzOQ==_cdn_script_1725273149000_MTcxNjI3ODgwNzkwNDAxMjI2Mg==_1716278838752.png",
    "https://public.hxdsmy.com/static/MTcyNTI3MzEzMDg0MDE2MTYzOQ==_cdn_script_1725273158000_MTcxNjI3ODgwNzkwNDAxMjI2Mg==_1716278849339.png"
])

const onSuccess = () => {
    console.log('验证成功');
    emit('onSuccess', true)
};

const onFail = () => {
    console.log('验证失败');
    emit('onSuccess', false)
};

</script>
<!-- @again="onAgain" -->
<!-- @refresh="onRefresh" -->
<template>
    <div>
        <slide-verify class="slide_box" ref="block" slider-text="向右滑动" :accuracy="1" @success="onSuccess" @fail="onFail"
            :imgs="imgs"></slide-verify>
    </div>
</template>